#ifndef myEvent_h__
#define myEvent_h__

#include "../adapter/skyAdapter.h"
#include "./myIEventManager.h"
#include "./myMacro.h"

namespace Framework
{
	using namespace Sky;

	//class myEvent : public Object
	//{
	//	DECL_RTTI1(myEvent,Object);
	//public:
	//	myEvent(Object* sender = vNull,Object* message = vNull):_sender(sender),_message(message){}
	//private:
	//	ObjectPtr _sender;
	//	ObjectPtr _message;
	//};

	//typedef RefPtr<myEvent> myEventPtr;

	class myMessage : public Object
	{
		DECL_RTTI1(myMessage,Object);
	public:
		typedef MsgStatus (Object::*Event)(myIEventManager* manager,myMessage* msg);

		myMessage(Event event,Object* sender = vNull,Object* message = vNull):_event(event),_sender(sender),_message(message){}
		ObjectPtr& getMessage(){return _message;}
		
		Event getEvent(){return (Event)_event;}
	protected:
		ObjectPtr _sender;
		ObjectPtr _message;
		Event	  _event;
	};
	typedef RefPtr<myMessage> myMessagePtr;
}
#endif // myEvent_h__